package com.example.xwen.broadcast;

import android.content.DialogInterface;
import android.content.Intent;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

public class MainActivity extends AppCompatActivity {
    private Button button = null;
    private final String nobady = "Who.am.i";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.my_layout);
        button = (Button) findViewById(R.id.button);
        button.setOnClickListener(new ButtonListener());
    }
    class ButtonListener implements View.OnClickListener {
        @Override
        public void onClick(View v){
            Intent intent = new Intent(nobady);
            intent.putExtra("testIntent","66666666666666");
            sendBroadcast(intent);
        }
    }
}
